home *** CD-ROM | disk | FTP | other *** search
/ Acorn RISC PD-CD 1 / Acorn RISC PD-CD 1.iso / languages / bcpl / forth / _forth / dict < prev    next >
Encoding:
Text File  |  1989-06-14  |  2.2 KB  |  53 lines

  1.    This file contains the dictionary entries called words of the FORTH
  2. compiler / interpreter, it should be used to check the semantics and number
  3. of stack entries of the words. A short example follows of the syntax used to
  4. desribe them.
  5.  
  6. DUP  [ W32a -> W32a W32a ]  (special) this word is used to duplicate the top 32 bit word on the stack.
  7.  
  8.    The entry starts of with the word being defined, next in the square
  9. brackets comes the stack usage. The values on the stack before the call of
  10. DUP are shown to the left of the -> those left on the stack after the call
  11. are shown on the right. Each stack element definition is made up of three
  12. parts the first part is a letter showing the type of the stack element.
  13.          A = address
  14.          U = unsigned
  15.          S = signed                                                               
  16.          W = a word (address or unsigned or signed)
  17.    The next part is a number showing the number of bits that the element
  18. takes up.
  19.    The final part is a letter which is used to distinguish between stack
  20. elements i.e.
  21.  
  22. ROT [ W32a W32b W32c -> W32b W32c W32a] (main) this word is used to rotate
  23.     the top three stack elements, the bottom one of these becomes the top.
  24.  
  25.    Next comes a name in brackets, this is the dictionary that the word is
  26. contained in, currently there are three basic dictionaries defined:
  27.       1. main - this is the dictionary which contains the words that are
  28. interpreted from the prompt, as well as basic stack manipulation there arewords for I/O, dictionary manipulation, etc.
  29.       2. compiler - this dictionary is only available when compiling a new word, it contains words for iteration, selection, etc.
  30.       3. special - this dictionary contains the most used words from the main dictionary. The are compiled in a special way so that they run much faster than ordinary words. 
  31.    Finally comes a description of the word its actions, semantics, and usual uses.
  32.  
  33.  
  34. DUP  [ W32a -> W32a W32a ]  (special) this word is used to duplicate the top 32 bit word on the stack.
  35.  
  36. ROT [ W32a W32b W32c -> W32b W32c W32a] (main) this word is used to rotate
  37.     the top three stack elements, the bottom one of these becomes the top.
  38.  
  39. +
  40.  
  41. -
  42.  
  43. *
  44.  
  45. /
  46.  
  47. ?
  48.  
  49. @
  50.  
  51. !
  52.  
  53.